import request from '@/utils/request'
const getEmployeeSimpleAPI = () => {
  return request({
    url: '/sys/user/simple'
  })
}
const addEmployeerAPI = data => {
  return request({
    url: '/company/department',
    method: 'POST',
    data
  })
}
const getEmployeerinfoAPI = params => {
  return request({
    url: '/sys/user',
    method: 'GET',
    params
  })
}
const delEmployeerAPI = id => {
  return request({
    url: `/sys/user/${id}`,
    method: 'DELETE'
  })
}
const addEmployeeAPI = data => {
  return request({
    method: 'post',
    url: '/sys/user',
    data
  })
}
const importEmployeeAPI = data => {
  return request({
    url: '/sys/user/batch',
    method: 'POST',
    data
  })
}
const getUserDetailAPI = id => {
  return request({
    url: `/sys/user/${id}`
  })
}
const updateUserInforAPI = data => {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'PUT',
    data
  })
}
const assignRolesAPI = data => {
  return request({
    url: '/sys/user/assignRoles',
    data,
    method: 'put'
  })
}
export {
  assignRolesAPI,
  updateUserInforAPI,
  getEmployeeSimpleAPI,
  addEmployeerAPI,
  getEmployeerinfoAPI,
  delEmployeerAPI,
  addEmployeeAPI,
  importEmployeeAPI,
  getUserDetailAPI
}
